package com.settlement.system.model.entity.common;

import java.util.Date;

import java.io.Serializable;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.settlement.system.common.enums.OrganTypeEnum;
import com.settlement.system.converter.DateFormatConvert;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * 订单稽核-三级来源多店铺
 * @author xiaochuan
 * @since 2021-04-26
 */
@Data
@ExcelIgnoreUnannotated
@HeadStyle(fillBackgroundColor = 9,fillForegroundColor = 9)
@HeadRowHeight(value = 20)
@HeadFontStyle(fontHeightInPoints = 14)
public class TblOrderChannelShops extends BaseModel implements Serializable {


    /**
     * 店铺编码
     */
    @ExcelProperty(value = "店铺编码")
    @ApiModelProperty(value = "店铺编码")
    private String shopNo;

    /**
     * 店铺名称
     */
    @ExcelProperty(value = "店铺名称")
    @ApiModelProperty(value = "店铺名称")
    private String shopName;

    /**
     * 订单三级来源编码
     */
    @ExcelProperty(value = "三级来源编码")
    @ApiModelProperty(value = "订单三级来源编码")
    private String threeLevelChannelNo;

    /**
     * 订单三级来源名称
     */
    @ExcelProperty(value = "三级来源名称")
    @ApiModelProperty(value = "订单三级来源名称")
    private String threeLevelChannelName;

    /**
     * 生效时间
     */
    @ExcelProperty(value = "生效起始日期",converter = DateFormatConvert.class)
    @ApiModelProperty(value = "生效起始日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date effectiveDate;

    /**
     * 终止日期
     */
    @ExcelProperty(value = "生效截止日期",converter = DateFormatConvert.class)
    @ApiModelProperty(value = "生效截止日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date expiredDate;

    /**
     * 结算公司编码
     */
    @ExcelProperty(value = "结算公司编码")
    private String companyNo;

    /**
     * 本部编码
     */
    private String organTypeNo;

    /**
     * 本部
     */
    @ExcelProperty(value = "本部")
    private String organTypeName;

    public void setOrganTypeNo(String organTypeNo) {
        this.organTypeNo = organTypeNo;
        String nameByNo = OrganTypeEnum.getNameByNo(organTypeNo);
        this.organTypeName = nameByNo;
    }
}
